<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/application_fee_management/application_fee_management.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/application_fee_management/application_fee_management.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '应用收费管理',
                name: 'application_fee_management/application_fee_management',
                url: "/application_fee_management/",
                sortName: "business_date"
            });
            const editFormFields = ref({"owner_unit":"","settlement_method":"","tonnage":"","unit_price":"","amount":"","business_date":"","handler":"","remarks":""});
            const editFormOptions = ref([[{"title":"货主单位","field":"owner_unit","type":"text"}],
                              [{"dataKey":"结算方式","data":[],"title":"结算方式","field":"settlement_method","type":"radio"}],
                              [{"title":"存储吨位","field":"tonnage","type":"text"}],
                              [{"title":"存储单价","field":"unit_price","type":"text"}],
                              [{"title":"存储金额","field":"amount","type":"text"}],
                              [{"title":"存储业务日期","field":"business_date","type":"date"}],
                              [{"title":"经办人","field":"handler","type":"text"}],
                              [{"title":"备注","field":"remarks","type":"textarea"}]]);
            const searchFormFields = ref({"owner_unit":"","settlement_method":"","other_payment_method":"","business_date":"","handler":""});
            const searchFormOptions = ref([[{"title":"货主单位","field":"owner_unit","type":"like"}],[{"dataKey":"结算方式","data":[],"title":"结算方式","field":"settlement_method","type":"like"}],[{"title":"结算方式","field":"other_payment_method","type":"like"}],[{"title":"经办人","field":"handler","type":"like"}],[{"title":"存储业务日期","field":"business_date","type":"date"}]]);
            const columns = ref([{field:'id',title:'业务单号',type:'string',width:110,readonly:true,require:true,align:'left',sort:true},
                       {field:'owner_unit',title:'货主单位',type:'string',width:220,align:'left'},
                       {field:'settlement_method',title:'结算方式',type:'int',bind:{ key:'结算方式',data:[]},width:110,align:'left'},
                       {field:'other_payment_method',title:'结算方式',type:'string',width:220,hidden:true,align:'left'},
                       {field:'tonnage',title:'存储吨位',type:'decimal',width:110,align:'left'},
                       {field:'unit_price',title:'存储单价',type:'decimal',width:110,align:'left'},
                       {field:'amount',title:'存储金额',type:'decimal',width:110,align:'left'},
                       {field:'business_date',title:'存储业务日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'handler',title:'经办人',type:'string',width:220,hidden:true,align:'left'},
                       {field:'remarks',title:'备注',type:'string',width:220,hidden:true,align:'left'},
                       {field:'ISDel',title:'逻辑删除字段，0表示未删除，1表示已删除',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Apeople',title:'核对人',type:'string',width:120,align:'left'},
                       {field:'AdaTe',title:'核对时间',type:'datetime',width:120,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
